package com.project.bean;

/**
 * 评论实体类
 */
public class CommentBean {
    /**评论编号*/
    private Integer id;
    /**评论人*/
    private UserBean user;
    /**评论内容*/
    private String content;
    /**评论商品*/
    private CommodityBean commodity;


    public CommentBean() {
    }

    public CommentBean(Integer userId,String content,Integer commodityId) {
        this.user=new UserBean();
        user.setId(userId);
        this.content = content;
        this.commodity=new CommodityBean();
        commodity.setId(commodityId);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public CommodityBean getCommodity() {
        return commodity;
    }

    public void setCommodity(CommodityBean commodity) {
        this.commodity = commodity;
    }

    @Override
    public String toString() {
        return "CommentBean{" +
                "id=" + id +
                ", user=" + user +
                ", content='" + content + '\'' +
                ", commodity=" + commodity +
                '}'+"\n";
    }
}
